package com.sunda.spmswms.mapper;

import com.sunda.spmswms.entity.WhsRepackage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Wayne
 * @since 2021-06-28
 */
@Mapper
public interface WhsRepackageMapper extends BaseMapper<WhsRepackage> {

    @Update("UPDATE WHS_REPACKAGE WR SET WR.STATUS = '2' WHERE REPACKAGE_BILL_NO =#{billNote}")
    int changeStatus(@Param("billNote") String billNote);

    @Update("UPDATE WHS_REPACKAGE WR SET WR.STATUS='2' WHERE WR.REPACKAGE_BILL_NO=#{billNo}")
    int updateStatus(@Param("billNo") String billNo);

    @Select("SELECT DISTINCT REPACKAGE_BILL_NO FROM WHS_REPACKAGE_DTL WHERE 1=1")
    List<String>selectHistoryList();



}
